<div class="my_meta_control">
	<?php global $wpdb; ?>
	<p>Choose Slideshow Below</p>
 
	<?php 
	
		$choose_next_gen = $wpdb->get_results( 
			"
			SELECT *
			FROM wp_ngg_gallery
			"
		);
	?>
	<?php $mb->the_field('nextgen_id'); ?>

	<select name="<?php $mb->the_name(); ?>" id="manual_add">
		<option value="-1">-Select-</option>
		<?php foreach($choose_next_gen as $key=>$val){?>
				<?php if( $val->gid == $mb->get_the_value() ){ ?>
						<option value="<?php echo $val->gid;?>" selected="selected"><?php echo $val->title;?></option>
				<?php }else{ ?>
						<option value="<?php echo $val->gid;?>"><?php echo $val->title;?></option>
				<?php } ?>
		<?php }?>
	</select>
	<p>To Add slideshow <a href="<?php bloginfo('url');?>/wp-admin/admin.php?page=nggallery-add-gallery" target="_blank">Click here</a></p>
</div>